
    <!-- 已有软件 -->

    <template>
        
        <div>
          <h3 class="notitle">当前页面：{{ $route.meta.title }}</h3>
          <div class="pb10px">
            
            <!-- ctrl+alt+l 格式化代码   -->
            <el-input v-model="searchForm.perName" @input="handleSearch" class="input1" clearable placeholder="请输入软件名称"
                      size="small" ></el-input>
            <el-button type="primary" icon="el-icon-search" size="small" class="mr10px" @click="handleSearch">搜索</el-button>
          </div>
      
          <!-- <div>
            <el-button type="primary" @click="handleAdd" size="small">新增</el-button>
            <el-button type="danger" size="small" @click="batchDelete" :disabled="ids.length>0?false:true">批量删除
            </el-button>
          </div> -->
      
          <el-table
              ref="multipleTable"
              :data="tableData"
              tooltip-effect="dark"
              style="width: 100%"
              @selection-change="handleSelectionChange">
            <el-table-column
                type="selection"
                width="55">
            </el-table-column>
            <el-table-column
            prop="id"
            label="ID"
            width="70">
        </el-table-column>
        <el-table-column
            prop="name"
            label="项目名称"
            width="260">
        </el-table-column>
        <el-table-column
            prop="projectVersion"
            label="版本"
            width="150">
        </el-table-column>
        <el-table-column
            prop="createTime"
            label="发布时间"
            width="300">
        </el-table-column>
        <!-- <el-table-column
            prop="maintenanceEffectiveness"
            label="维护绩效"
            width="200">
        </el-table-column> -->
        <el-table-column
            prop="updateTime"
            label="更新时间"
            width="200">
        </el-table-column>
            <!--      fixed="right"-->
            <!-- <el-table-column label="操作"
                             width="150"
            >
              <template slot-scope="scope">
                <el-button
                    size="mini"
                    @click="handleEdit(scope.$index, scope.row)">编辑
                </el-button> -->
                <!-- index索引 scope.row这一条数据所有的值 -->
                <!-- <el-button
                    size="mini"
                    type="danger"
                    @click="handleDelete(scope.$index, scope.row)">删除
                </el-button>
              </template>
            </el-table-column> -->
          </el-table>
      
          <!--自定义分页组件-->
          <custom-pages
              @current-change="currentChange"
              @size-change="sizeChange"
              :total="pageInfo.total"
              :page-size="pageInfo.pageSize"
              :current-page="pageInfo.pageNum"
          >
          </custom-pages>
          <!--自定义分页组件-->
        

          <!--自定义抽屉组件-->
          <!-- <custom-drawer
              :form-data="formData"
              :rules-form="ruleForm"
              @close-drawer="closeDrawer"
              @submit-drawer="submitDrawer"
              :is-drawer-dialog="isDrawerDialog"
          >
            <div slot="content">
              <el-form-item label="权限名" prop="perName">
                <el-input v-model="formData.perName" placeholder="请输入权限名"></el-input>
              </el-form-item>
              <el-form-item label="描述" prop="perDesc">
                <el-input v-model="formData.perDesc" placeholder="请输入描述"></el-input>
              </el-form-item>
              
            </div>
          </custom-drawer> -->
          <!--自定义抽屉组件-->
    
          <el-dialog
            title="提示"
            :visible.sync="error"
            width="30%"
            append-to-body
            top="20%"
            ><!-- append-to-body出现不会屏幕变暗,top位置下调 -->
            <span>{{ message }}</span>
            <span slot="footer" class="dialog-footer">
                <el-button @click="error = false">取 消</el-button>
                <el-button type="primary" @click="error = false">确 定</el-button>
            </span>
            </el-dialog>
          
             
           
            
        </div>
        
      </template>
      
      <script>
      
      //引入混入
      import create from "@/mixins/create";
      import http from "@/utils/request"
      // import CustomPages from "@/components/CustomPages"
    
      export default {
        data() {
          //页面格式化 ctrl+alt+l
          return {
            api: {
              pageUrl: "/client/getproject",
              saveUrl: "",
              delUrl: "",
              modUrl: "",
            },
            ruleForm: {
              perName: [
                {required: true, message: '请输入软件名称', trigger: 'blur'},
              ],
              perDesc: [
                {required: true, message: '请输入描述', trigger: 'blur'},
              ],
            },
      
            formData: {
              id: null,
              perName: "", //新增的软件名称
              perDesc: "", //
            },
            searchForm: {
              perName: ""
            },
            message:'',
          }
        },
        mixins: [create],
        created() {
        },
        methods: {
          getList() {
            let data = Object.assign(this.searchForm, this.pageInfo)
            
            let formData1 = {
              userId:sessionStorage.getItem('userId')
            };
            
            http.get(`${this.api.pageUrl}?${new URLSearchParams(formData1).toString()}`).then(res => {
                this.tableData = res.data.data
                this.pageInfo.total = res.data.total
                console.log(res)
            })
        },
        },
        
      };
      </script>
      
      <style scoped>
      .input1{
        width: 260px;
      }

      .notitle{
        color: black;
        font-size:25px;
        margin-top: 1%; 
        margin-left: 0%;
      }/* 面包屑 */

     
      </style>